package com.qfedu.food.service.impl;

import com.qfedu.food.dao.TUserLogDao;
import com.qfedu.food.pojo.TUserLog;
import com.qfedu.food.service.intf.TUserLogService;
import com.qfedu.food.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TUserLogServiceImpl implements TUserLogService {
    @Autowired
    private TUserLogDao dao;

    @Override
    public R save(TUserLog userlog) {
        if (userlog != null){
            if (dao.insert(userlog) > 0){
                return R.ok();
            }
        }
        return R.fail("新增异常");
    }

    @Override
    public R queryAll() {
        return R.ok(dao.selectAll());
    }
}
